const config = {
	verify: 5, //手机验证码位数控制
	version: "1.0.00", //系统版本号
	langtype: 0, //默认语言下标，与下面的 language 方法相关
	ios: '', //苹果app下载地址
	android: '', //安卓app下载地址
	appname: '', //APP名字
	uploadtype: 1,
	invite: 0, //邀请码状态，0：非必填，1：必填
}

const User_paw = function(user, paw) {
	let User_paw = []
	User_paw.push(user)
	User_paw.push(paw)
	uni.setStorageSync('User_paw', User_paw)
	// return User_paw
}

const Memory = function(memory) {
	uni.setStorageSync('memory', memory)
}

const language = [{
	id: 'zh-cn',
	name: '中文',
	code: 'chn',
}, {
	id: 'en-us',
	name: 'English',
	code: 'eng',
}];

const root = ''; //'';//
// const root = 'http://pai.yzacc.com';//'http://rr0478b.8396048.com'; //'';//
// const root = 'https://pai.gwind55.com';//'http://rr0478b.8396048.com'; //'';//
// const root = 'https://jipin.bipinmall.com';//'http://rr0478b.8396048.com'; //'';//
// const root = 'http://0495.nethhw.com';//'http://rr0478b.8396048.com'; //'';//
// const root = 'http://rr0478b.8396048.com';//'http://rr0478b.8396048.com'; //'';//
// const root = 'http://192.168.0.157/index.php'; //'';//
const api = {
	// root: 'http://192.168.0.157/index.php',
	// root: 'https://pai.gwind55.com',
	root: '',
	login: {
		//: root + "",//
		login: root + "login", // 登录
		info: root + "info", // logo
		wxlogin: root + "wxapplogin", // 微信登录
		register: root + "register", // 注册
		code: root + "code", // 获取验证码
		bind: root + "bind", // 绑定手机号
		forgetPwd: root + "forgetPwd", //修改密码
		account: root + "random" //获取账号
	},
	index: {
		getCategory: root + "merch/reg/getCategory", //获取分类
		getWxConfig: root + "getSignPackage", //获取公众号配置
		getRegContent: root + "merch/reg/getRegContent", //获取入驻协议
		applyInto: root + "merch/reg/improveInformation", //商户申请
		getGoodList: root + "sms_store/index/getGoodList", //获取商品列表
		getMerchInfo: root + "merch/index/getMerchInfo", //商家详情
		getApplyInfo: root + "merch/reg/getMerchRegStep", //获取入驻申请信息
		getMerchList: root + "merch/index/getMerchList", //获取商家列表
		getCategoryNav: root + "sms_store/index/getCategory",
		getCateGoodList: root + "sms_store/index/getCateGoodList",
	},
	user: {
		info: root + "member/index/info", // 会员信息接口
		code: root + "member/index/getMyCode", // 推广码
		orderCount: root + "sms_store/order/getOrderCount", // 获取订单数量
		upload: root + "member/index/upload", // 上传图片
		updateInfo: root + "member/index/updateUserInfo", // 更新会员信息
		bindMobile: root + "member/index/bindMobile", // 绑定手机号
		aboutUs: root + "member/index/aboutUs", // 关于我们
		// getMyTeam: root + "unicom/application/myTeam", // 获取会员团队列表
		// myTeam: root + "member/index/getMyTeam", // 获取会员团队列表
		myTeam: root + "team_range/Agent/getSubordinate", // 获取会员团队列表
		subordinate: root + "team_range/Agent/getSubordinate", // 获取会员团队详情
		team: root + "sms_queue/index/team", //我的网体
		queue: root + "sms_queue/index/queue", //当前会员已经加入的队列
		directPush: root + "team_range/Reward/getDirectPush", //积分明细
		service: root + "single_page/Index/MyService", //服务协议
		obtain: root + "member/index/accounts", //获取子账号
		switcher: root + "member/index/switchLogin", //切换子账号
		insert: root + "member/index/register", //添加子账号
		getAgent: root + "team_range/Agent/getAgent", //查询当前代理等级
		signList: root + "creditshop/home/sign_list", //签到积分签到列表
		give: root + "member/Index/Give",//转让签到积分
		withdrawal: root + "member/Index/apiBalanceWithdrawal",//购物积分一键提现
		apiChangePassword: root + "member/Index/apiChangePassword",//修改交易密码
		getAchievement: root + "team_range/Agent/getAchievement", //个人业绩
	},
	card: {
		packageList: root + "unicom/application/packageList", // 套餐列表
		jobNumber: root + "unicom/application/getJobNumber", // 获取工号
		applyCard: root + "unicom/application/accountOpenApply", // 开户申请
		applyNumber: root + "unicom/application/jobNumberApply", // 申请工号
		getCarouse: root + "unicom/application/getCarouse", // 获取联通模块轮播图
	},
	balance: {
		myCredit: root + "member/index/myCreditList", // 我的明细
		record: root + "member/index/record", // 购物积分明细
		withdraw: root + "member/index/withdraw", // 提现记录
		order: root + "grade_commission/order/index", //出入账记录
		log: root + "grade_commission/log/index", //日志
	},
	rice: {
		rice: root + "unicom/application/getRice", // 米粒数量
		riceDetail: root + "unicom/application/riceLog", // 米粒转出明细
		cashDetail: root + "unicom/application/cash", // 米粒转出到购物积分
		already: root + "unicom/application/riceLog", // 已结算
	},
	mobile: {
		getMobile: root + "unicom/application/getMobile", // 我的手机号
	},
	upload: {
		uploadImg: root + "unicom/application/upload", // 上传付款凭证
		recharge: root + "member/Index/PostCredit", // 购物积分充值
		collection: root + "member/Index/collection", // 购物积分充值
		withdrawal: root + "member/Index/WithdrawalCredit", //签到积分提现
		withdrawalSet: root + "member/Index/WithdrawalSet", //手续费
		withdrawalLog: root + "member/index/withdrawalLog", //提现明细
	},
	group: {
		groupList: root + "groups/home/info", // 拼团列表展示
		categroy: root + "groups/goods/categroy", // 分类列表
		teaming: root + "groups/goods/teaming", // 正在进行中的团
		goodsList: root + "groups/goods/list", // 拼团商品列表
		goodsInfo: root + "groups/goods/goodsInfo", // 拼团商品详情
		confirmDetail: root + "groups/order/confirmDetail", // 拼团下订单数据确认
		confirm: root + "groups/order/confirm", // 确认下单
		payDetail: root + "groups/order/payDetail", // 订单支付详情
		pay: root + "groups/order/pay", // 支付拼团订单
		list: root + "groups/order/list", // 订单列表
		teams: root + "groups/goods/teams", // 团列表
		cancel: root + "groups/order/cancel", // 取消订单
		orderDetail: root + "groups/order/orderDetail", // 订单详情
		remove: root + "groups/order/remove", // 删除订单
		orderConfirm: root + "groups/order/orderConfirm", // 确认收货
		status: root + "groups/order/status", // 订单数据统计
		teamsDetail: root + "groups/goods/teamsDetail", // 我的团详情
		share: root + "getSignPackage", // 分享
	},
	category: {
		goodsCate: root + "sms_store/index/getGoodsCate", // 商品分类
		subGoodsCate: root + "sms_store/index/getSubGoodsCate", // 一级分类下面的全部分类
		goodList: root + "sms_store/index/getGoodList", // 商品列表
		goodDetail: root + "sms_store/index/getGoodsDetail", // 商品详情
		goodComment: root + "sms_store/index/getGoodsComment", // 商品评价
	},
	cart: {
		myCart: root + "sms_store/member/myCart", // 我的购物车
		addToCart: root + "sms_store/member/addToCart", // 加入购物车
		removeCart: root + "sms_store/member/removeCart", // 删除购物车商品
		updateCart: root + "sms_store/member/updateCart", // 更新购物车商品数量

	},
	upgrade: {
		getUpgradeGoods: root + "sms_store/index/getUpgradeGoods", //升级
	},
	address: {
		addressList: root + "sms_store/member/getAddressList", // 收货地址列表
		modifyAddress: root + "sms_store/member/modifyAddress", // 添加/更新收货地址
		deteleAddress: root + "sms_store/member/deteleAddress", // 删除收货地址
		getAddress: root + "sms_store/member/getAddress", // 地址详情
		setAddress: root + "sms_store/member/setAddressDefault", // 设置默认地址
		editreceiving: root + "groups/order/editreceiving", // 修改拼团收货地址
		edit: root + "creditshop/order/editreceiving", // 修改签到积分收货地址
	},
	main: {
		//: root + "",//
		// user: root + "base_store/member/info", // 用户信息
		swiper: root + "sms_store/index/getBanner", // 获取首页轮播图片
		swiperList: root + "groups/goods/adv", // 拼团轮播图
		getpage: root + "index/getpage", // 首页
	},
	order: {
		caculate: root + "sms_store/order/caculate", // 创建订单
		create: root + "sms_store/order/create", //提交订单
		payInfo: root + "sms_store/order/payInfo", //订单编号
		pay: root + "sms_store/order/pay", //订单支付
		orderList: root + "sms_store/order/getOrderList", //订单列表
		detele: root + "sms_store/order/detele", //删除订单
		cancel: root + "sms_store/order/cancel", //取消订单
		confirm: root + "sms_store/order/confirm", //确认收货
		orderDetail: root + "sms_store/order/getOrderDetail", //订单详情
		expressQuery: root + "sms_store/order/expressQuery", //物流查询
		orderComment: root + "sms_store/order/comment", //订单评价
		refund: root + "sms_store/order/refund", //申请退货
		express: root + "express_delivery/index/apiInquireOrder", //签到积分商城物流查询
	},
	collection: {
		addCollection: root + "sms_store/member/addMyCollection", //加入我的收藏
		myCollection: root + "sms_store/member/myCollection", //我的收藏
		removeMyCollection: root + "sms_store/member/removeMyCollection", //删除我的收藏商品
		removeGoodsCollection: root + "sms_store/member/removeGoodsCollection", //商品列表删除我的收藏商品
	},
	points: {
		getBanner: root + "creditshop/home/info", //轮播图
		getGoodList: root + "creditshop/goods/list", //商品列表
		getGoodsDetail: root + "creditshop/goods/goodsInfo", //商品详情
		confirmDetail: root + "creditshop/order/confirmDetail", //订单数据确认
		confirm: root + "creditshop/order/confirm", //确认订单
		payDetail: root + "creditshop/order/payDetail", //订单支付详情
		pay: root + "creditshop/order/pay", //支付订单
		list: root + "creditshop/order/list", //订单列表
		orderDetail: root + "creditshop/order/orderDetail", //订单详情
		remove: root + "creditshop/order/remove", // 删除订单
		cancel: root + "creditshop/order/cancel", // 取消订单
		orderConfirm: root + "creditshop/order/orderConfirm", // 确认收货
		remove: root + "creditshop/order/remove", // 删除订单
		set: root + "creditshop/home/set", //规则
		sign: root + "creditshop/home/sign", //签到积分签到
	},
	// 公排
	common: {
		order: root + "sms_queue/index/order", //获取公排订单 
		commission: root + "sms_queue/index/commission", //获取公排佣金
		goods: root + "sms_queue/index/goods", //获取公排商品
		setRepeat: root + "sms_queue/index/setRepeat", //设置公排商品复购
	},
	profile: {
		getConfig: root + "regional_agent/member/getConfig", //代理设置
		agentApply: root + "regional_agent/member/agentApply", //代理申请
		getApplyInfo: root + "regional_agent/member/getApplyInfo", //申请结果
		getInfo: root + "member/index/info", //分销中心获取用户信息
		getAgentRewardLog: root + "regional_agent/member/agentRewardLog", //获取分红记录
		getAgentReward: root + "regional_agent/member/getAgentReward", //获取分红统计
	},
	// 优惠券
	discount: {
		getMyCouponList: root + "store_marketing/index/getMyCouponList", //我的优惠券列表
		receiveCoupon: root + "store_marketing/index/receiveCoupon", //领取优惠券
	}
}
export default {
	root,
	api,
	config,
	User_paw,
	Memory,
	language
}
